﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management.master" AutoEventWireup="true" CodeFile="NewReportsUser.aspx.cs" Inherits="User_Account_NewReportsUser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager runat="server" ID="smgrUser" EnablePartialRendering="true">
    </asp:ScriptManager>
    <div class="contents">
        <table width="100%" cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td colspan="2">
                    <h1>
                        Create New Reports User</h1>
                </td>
            </tr>
            <tr>
                <td width="150"><b>User Role</b></td>
                <td>:&nbsp;&nbsp;
                    <asp:DropDownList ID="ddlUserRole" runat="server">
                        <asp:ListItem value="-1" Selected="True">Select</asp:ListItem>
                        <asp:ListItem value="100">User</asp:ListItem>
                        <asp:ListItem value="200">Finance</asp:ListItem>
                        <asp:ListItem value="300">Admin</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvUserRole" runat="server" ValidationGroup="customer" Display="Dynamic" InitialValue="-1"
                        ErrorMessage="Require UserRole." Text="" ControlToValidate="ddlUserRole"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td width="150"><b>Email</b></td>
                <td>:&nbsp;&nbsp;
                    <asp:TextBox ID="txtEmail" runat="server" Width="250px" MaxLength="60"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvEmail"  runat="server"
                         ValidationGroup="customer" ErrorMessage="Require Email." Text="" ControlToValidate="txtEmail"
                        Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revEmail" runat="server" ValidationGroup="customer" 
                    ErrorMessage="Invaild Email" Text="" ControlToValidate="txtEmail"
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td width="150"><b>Password</b></td>
                <td>:&nbsp;&nbsp;
                    <asp:TextBox ID="txtPassword" runat="server" Width="150px" MaxLength="15" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvPassword" runat="server" ControlToValidate="txtPassword"
                            Display="Dynamic" ErrorMessage="Require password." Text=""
                            ValidationGroup="customer"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="revPassword" runat="server" ControlToValidate="txtPassword"
                            ValidationExpression="^\w*(?=\w*[A-Z]{2})\w{8,20}$" Display="Dynamic"
                            ErrorMessage="Password must be two upper and (8-15) characters long." ValidationGroup="customer"/>
                </td>
            </tr>
            <tr>
                <td width="150"><b>Confirm Password</b></td>
                <td>:&nbsp;&nbsp;
                    <asp:TextBox ID="txtConfirmPassword" runat="server" Width="150px" MaxLength="15" TextMode="Password"></asp:TextBox>
                    <asp:CompareValidator ID="csvConfirmPassword" runat="server" ControlToCompare="txtPassword"
                            ControlToValidate="txtConfirmPassword" Display="Dynamic" ErrorMessage="Password and confirm password must be same."
                            Text="" ValidationGroup="customer"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td width="150"><b>First Name</b></td>
                <td>:&nbsp;&nbsp;
                    <asp:TextBox ID="txtFirstName" runat="server" Width="200px" MaxLength="60"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="revFirstName" runat="server" ValidationGroup="customer"
                        ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" ControlToValidate="txtFirstName" 
                        ErrorMessage="Enter Alphabetic only"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td width="150"><b>Sur Name</b></td>
                <td>:&nbsp;&nbsp;
                    <asp:TextBox ID="txtSurName" runat="server" Width="200px" MaxLength="60"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvSurName" runat="server" ValidationGroup="customer" Display="Dynamic" 
                        ErrorMessage="Require SurName." Text="" ControlToValidate="txtSurName"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revSurname" runat="server" ValidationGroup="customer"
                        ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" ControlToValidate="txtSurName" 
                        ErrorMessage="Enter Alphabetic only"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td width="150"><b>DOB</b></td>
                <td>:&nbsp;&nbsp;
                    <asp:DropDownList ID="ddlDay" runat="server"></asp:DropDownList>
                    <asp:DropDownList ID="ddlMonth" runat="server"></asp:DropDownList>
                    <asp:DropDownList ID="ddlYear" runat="server"></asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvDay" runat="server" ValidationGroup="customer" Display="Dynamic" InitialValue="00"
                        ErrorMessage="Require Day." Text="" ControlToValidate="ddlDay"></asp:RequiredFieldValidator>                        
                    <asp:RequiredFieldValidator ID="rfvMonth" runat="server" ValidationGroup="customer" Display="Dynamic" InitialValue="00"
                        ErrorMessage="Require Month." Text="" ControlToValidate="ddlMonth"></asp:RequiredFieldValidator>
                    <asp:RequiredFieldValidator ID="rfvYear" runat="server" ValidationGroup="customer" Display="Dynamic" InitialValue="0000"
                        ErrorMessage="Require Year." Text="" ControlToValidate="ddlYear"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td width="150"><b>Gender</b></td>
                <td>:&nbsp;&nbsp;
                    <asp:DropDownList ID="ddlGender" runat="server">
                        <asp:ListItem value="-1" Selected="True">Select</asp:ListItem>
                        <asp:ListItem value="M">Male</asp:ListItem>
                        <asp:ListItem value="F">Female</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvGender" runat="server" ValidationGroup="customer" Display="Dynamic" InitialValue="-1"
                        ErrorMessage="Require Gender." Text="" ControlToValidate="ddlGender"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td width="150"><b>Marital Status</b></td>
                <td>:&nbsp;&nbsp;
                    <asp:DropDownList ID="ddlMaritalStatus" runat="server">
                        <asp:ListItem value="-1" Selected="True">Select</asp:ListItem>
		                <asp:ListItem  value="1">Single</asp:ListItem>
		                <asp:ListItem  value="2">Married</asp:ListItem>
		                <asp:ListItem  value="4">Widowed</asp:ListItem>
		                <asp:ListItem  value="5">Divorced</asp:ListItem>
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="rfvMaritalStatus" runat="server" ValidationGroup="customer" Display="Dynamic" InitialValue="-1"
                        ErrorMessage="Require Marital Status." Text="" ControlToValidate="ddlMaritalStatus"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button ID="btnSubmit" runat="server" Text="Submit" ValidationGroup="customer" OnClick="btnSubmit_Click" />&nbsp;
                    <asp:Button ID="btnClear" runat="server" Text="Clear" OnClick="btnClear_Click" />&nbsp;&nbsp;
                    <asp:Label runat="server" ID="lblError" ForeColor="Red"></asp:Label>
                    <asp:Label runat="server" ID="lblMessage" ForeColor="Green" Font-Bold="true"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>


